import 'package:flutter/material.dart';
import '../widgets/file_picker_sheet.dart';
import '../services/file_service.dart';

class FilePickerUtils {
  static Future<bool?> showFilePickerSheet(
    BuildContext context, {
    int currentDirectoryId = 0,
  }) {
    return showModalBottomSheet<bool?>(
      context: context,
      backgroundColor: Colors.transparent,
      isScrollControlled: true,
      builder:
          (context) => FilePickerSheet(
            currentDirectoryId: currentDirectoryId,
            onUploadComplete: () {
              // 通知文件列表更新
              FileService.notifyFileListUpdated();
            },
          ),
    );
  }
}
